package com.mcflies.study.extJS.action;

import java.util.HashMap;
import java.util.Map;

import com.mcflies.commons.action.McfliesSupportAction;
import com.mcflies.commons.commons.ActionReturnConstantKey;
import com.mcflies.study.extJS.commons.ExtJSConstantKey;
import com.mcflies.study.extJS.pojo.ExtJSUser;

/**
 * ExtJSBaseAction.java
 * @describe：接受ExtJS基本请求,请求的action需要符合:extJSBase_*
 * @Copyright(c) 2012-2024 Study,mcfly
 * @author mcfly_jun
 */
public class ExtJSBaseAction extends McfliesSupportAction{
	private ExtJSUser user;
	
	public String login() {
		Map<String, Object> retMap = new HashMap<String, Object>();
		try {
			retMap.put("successURL", "extJSPageSkip_skipToExtJSMain");
			showSuccessWithJson(retMap);
			return ExtJSConstantKey.EXTJS_LOGIN_SUCCESS;
		} catch (Exception e) {
			showExceptionWithJson(retMap, e);
			return ActionReturnConstantKey.JSON_RETURN_EXCEPTION;
		}
	}

	public ExtJSUser getUser() {
		return user;
	}

	public void setUser(ExtJSUser user) {
		this.user = user;
	}

}
